Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
A simple query
The following shows the content of
w-sstcst.html, which is one of the Web object example files found in the example directory:
This example illustrates the two basic WebSpeed tags used with embedded SpeedScript:
- Statement escape tags (
<script language="SpeedScript"> ... </script>), which allow you to embed one or more complete SpeedScript statements.In this example the embedded SpeedScript includes two SpeedScript statements,
FOR EACHandEND. These two statements form an iterating block that reads each record in the Customer table. For each record read, the block also executes the HTML markup between theFOR EACHstatement and theENDstatement.Note: The expression escape tags (- Expression escape tags (
‘...‘), which allow you to include the current value of a single data element directly into your HTML source.‘...‘) are back-tick characters and are not single quotes.In this case, the SpeedScript writes the values of three fields from the Customer table (
CustNum,Name, andPhone) as character strings. The HTML markup formats the character strings into a table, one row per record.Figure 2–1 shows the output when you compile and run
w-sstcst.html.Figure 2–1: Running w-sstcst
![]()
WebSpeed supports several alternative tags for both statement and expression escapes to ensure that you can use tags acceptable to your authoring tool. For more information, see the "Statement escapes" section and the "Expression escapes" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |